import java.util.Scanner;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: 26727
 * Date: 2024-01-17
 * Time: 19:48
 */
public class Main {
    public void merge(int A[],int B[],int m,int n) {
        int i = m-1;
        int j = n-1;
        int k = m + n - 1;
        //两个数组中都有数据
        while(i >= 0 && j >= 0) {
            if(A[i] <= B[j]) {
                A[k] = B[j];
                j--;
                k--;
            }
            else {
                A[k] = A[i];
                k--;
                i--;
            }
        }
        //有可能A走完了,B仍然还有数据
        while(j >= 0) {
            A[k] = B[j];
            j--;
            k--;
        }
    }
}
